<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

//获取用户信息
Route::group(function(){
    Route::post('user_info/changePassword','UserInfo/changePassword');
    Route::get('user_info/getMyInfo','UserInfo/getMyInfo');
    Route::get('user_info','UserInfo/index');
})->middleware([\app\middleware\CheckToken::class],array('manager','teacher','student'));

//定义各角色模块的路由

//课程管理员
Route::any('manager/:controller/:action','manager.:controller/:action')
->middleware([\app\middleware\CheckToken::class],array('manager'));

//教师
Route::any('teacher/:controller/:action','teacher.:controller/:action')
->middleware([\app\middleware\CheckToken::class],array('teacher'));

//学生
Route::any('student/:controller/:action','student.:controller/:action')
->middleware([\app\middleware\CheckToken::class],array('student'));

//Route::any('manager/:controller','manager.:controller/index');